<template>
  <el-card class="box-card" style="width: 100%;background-color:black;color: white;margin-left: auto;margin-left: auto">
    <el-row>
      <el-col :span="6">
        注册车辆：
        <dv-digital-flop :config="config" style="width:100px;height:50px;" />
      </el-col>
      <el-col :span="6">
        注册车位：
        <dv-digital-flop :config="config1" style="width:100px;height:50px;" />
      </el-col>
      <el-col :span="6">
        总收益：
        <dv-digital-flop :config="config2" style="width:100px;height:50px;" />
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="9">
        年收益：
        <dv-capsule-chart :config="year" style="width:300px;height:200px" />
      </el-col>
      <el-col :span="9">
        月收益：
        <dv-capsule-chart :config="mouth" style="width:300px;height:200px" />
      </el-col>
    </el-row>
  </el-card>





</template>

<script>
function formatter (number) {
  const numbers = number.toString().split('').reverse()
  const segs = []

  while (numbers.length) segs.push(numbers.splice(0, 3).join(''))

  return segs.join(',').split('').reverse().join('')
}
export default {
  name: "Platform",
  data() {
    return {
      config: {
        number: [100],
        content: '{nt}辆'
      },
      config1: {
        number: [999],
        content: '{nt}个'
      },
      config2: {
        number: [1999],
        content: '{nt}元',
        formatter
      },
      input: '',
      year: {
        data: [

          {
            name: '南阳',
            value: 167
          },
          {
            name: '周口',
            value: 67
          },
          {
            name: '漯河',
            value: 123
          },
          {
            name: '郑州',
            value: 55
          },
          {
            name: '西峡',
            value: 98
          }
        ]
      },
      mouth: {
        data: [

          {
            name: '南阳',
            value: 167
          },
          {
            name: '周口',
            value: 67
          },
          {
            name: '漯河',
            value: 123
          },
          {
            name: '郑州',
            value: 55
          },
          {
            name: '西峡',
            value: 98
          }
        ]
      }
    }
  },
  methods: {
    handleClick(){
      this.$router.push({name:"UpdUser"})
    }
  }
}
</script>

<style>
.el-row {
  margin-bottom: 20px
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>